package com.easylinkin.linkappapi.knowledgebase.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 知识类别表
 * </p>
 *
 * @author xy
 * @since 2021-12-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("linkapp_knowledge_type")
@ApiModel("知识类别(KnowledgeType)实体类")
public class KnowledgeType extends Model<KnowledgeType> {

  private static final long serialVersionUID = 1L;

  /**
   * 主键(自增)
   */
  @ApiModelProperty("主键(自增)")
  @TableId(value = "id_", type = IdType.AUTO)
  private Long id;

  /**
   * 租户id
   */
  @ApiModelProperty("租户id")
  @TableField("tenant_id")
  private String tenantId;

  /**
   * 父节点
   */
  @ApiModelProperty("父节点")
  @TableField("parent_id_")
  private String parentId;

  /**
   * 类型名称
   */
  @ApiModelProperty("类型名称")
  @TableField("name_")
  private String name;

  /**
   * 排序
   */
  @ApiModelProperty("排序")
  @TableField("order_")
  private Integer order;

  @ApiModelProperty("创建人")
  @TableField("creator_")
  private String creator;

  @ApiModelProperty("创建时间")
  @TableField("create_time_")
  private Date createTime;

  @ApiModelProperty("修改人")
  @TableField("modifier_")
  private String modifier;

  @ApiModelProperty("修改时间")
  @TableField("modify_time_")
  private Date modifyTime;

  @Override
  protected Serializable pkVal() {
    return this.id;
  }

}
